<%-- 
    Document   : viewStudents
    Created on : 11.02.2015, 23:07:05
    Author     : lui
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %>

<!DOCTYPE html>
<html>
    <head>
        <link rel="stylesheet" type="text/css" href="design/style.css">
        <title>View students</title>
    </head>
    
   
<body>
    <div id="website">
        
        <div id="header">
        </div>
            
            <div id="navbar">
<ul>        
 <p><a href="home.jsp">View my activities </a></p>
 <p><a href="viewStudents.jsp">View students </a></p>
 <p><a href="viewUniversities.jsp">View universities </a></p>
 <p><a href="viewCourses.jsp">View courses </a></p>
 <p><a href="viewLearningAgreements.jsp">Learning Agreements </a></p>
 <p><a href="statistics.jsp">Statistics </a></p>
</ul>
            </div>
        
        <div id="menue">
             <div id="font">
            <span style="font-family:Verdana"> 
            <h1>View students</h1>
            </span>
            <br>
               
            
            
            <div id="dropdown_viewStudents">
                <select>
                <option value="inc">incoming students</option>
                <option value="out">outgoing students</option>
                <option value="bo">both</option>
                </select>
                </div>
            
            
            
            
             <form action='' method='GET'>
                <input name='q' type='text'/>
                <input type='submit' value='Find student'/></form> 
            
            
            
            
            <br>
            
                    <form action="createStudent.jsp">
                    <input type="submit" value="Create student">
                    </form>
            <br>
            <br>
          
            <c:import var="studentInfo" url="studentXML.xml"/>

<x:parse xml="${studentInfo}" var="output" scope="application" />
     
<table border="1">
    <tr>
        <td>Name</td>
        <td>Studies</td>
        <td>Semester</td>
    </tr>
  <x:forEach var="students" select="$output/Students">
      <x:forEach var="student" select="$students/Student">
          
    <tr>
        <td>
            <a href="contactStudent.jsp"> <x:out select="$student/Name"/>&nbsp;</a>
        </td>
        <td>
           <x:out select="$student/Studies"/>&nbsp; 
        </td>
        <td>
           <x:out select="$student/Semester"/>&nbsp; 
        </td>
        
    </tr>
               
      </x:forEach>   
</x:forEach> 
</table>



          </div>
        
        </div>
        
    </div>    
</body>

</html>
